home *** CD-ROM | disk | FTP | other *** search
/ HamCall (October 1991) / HamCall (Whitehall Publishing)(1991).bin / util / grab / deskjet.doc next >
Text File  |  1990-10-14  |  9KB  |  182 lines

  1. The codes I have found in the manual for using the DeskJet are simple,
  2. others have more elaborate methods.  My codes are as follows:
  3.  
  4. Printer Type: Regular Printer
  5.  
  6. INIT String: 027 038 108 051 072  {This will feed the envelope}
  7. EXIT String: 027 038 108 048 072  {This will eject the envelope}
  8.  
  9. Also change the locations where the information prints:
  10.  
  11. Up Down Location of the "FROM ADDRESS"   -1
  12. Left to Right Loc of the "TO ADDRESS"    -8
  13. Left to Right Loc of the "FROM ADDRESS"  -5
  14.  
  15. The following is from two users of GRAB Plus that are using GRAB Plus along
  16. with the DeskJet printer from Hewlett Packard.  I do not personally
  17. recommend the use of the DeskJet printer for envelopes because of the water
  18. soluble ink that they use. - Paul Mayer, Author of GRAB Plus
  19. ----------------------------------------------------------------------------
  20. The following narrative is being reprinted by permission of
  21. T.L. Chadbourne [71320,501].  This in additive to my addendum should
  22. enable one to successful use the Deskjet with soft fonts and Grab
  23. Plus.
  24. ----------------------------------------------------------------------------
  25.        The DeskJet CAN be used to print very attractive envelopes with GRAB
  26. Plus 5.1.  It's not easy, but it is possible.  I managed to convince Mr. Mayer
  27. to increase the length of the printer INIT and EXIT strings to accommodate the
  28. long escape sequences used by the DeskJet.  I asked for 40 character strings,
  29. and he came up with 32 characters, still not quite enough for my needs but 
  30. much better than the 8 characters of GRAB Plus 5.0.
  31.  
  32.        If you want to skip the details, I've provided one basic set of INIT and 
  33. EXIT strings below which should give acceptable results.  The rest of the 
  34. letter should help if you want to use the more attractive fonts.  On the chance 
  35. that you might have a TmsRmn font cartridge, I've included a description of the 
  36. escape sequence I use with that cartridge.
  37.  
  38.        What follows are the results of about 8 hours of experimentation.
  39.  
  40. 1. GRAB Plus should be configured for a "regular printer" in the PRINTER menu 
  41. selection of GRABCFG.EXE.
  42.  
  43. 2. In the same menu, select the "DO NOT FILTER" option to allow uploading of 
  44. the escape sequence which configures the DeskJet.
  45.  
  46. 3. Use GRAB's INIT string to configure the printer for A4 paper.  The DeskJet 
  47. cannot print return addresses directly against the left margin of a standard 
  48. #10 envelope.  When configured for letter or legal size paper, or for a #10 
  49. envelope, the return address will be indented by a very noticeable 5/8".  This 
  50. can be reduced to an acceptable 7/16" by configuring the printer for the
  51. European A4 paper before printing, then switching back to the original paper
  52. size settings using the printer reset code (Esc E) in the EXIT sequence.
  53.  
  54. 4. Use GRAB's INIT string to disable perforation skip mode.  If perforation
  55. skip mode is enabled, the printer will execute three line feeds before
  56. printing, pushing the return address unacceptably low, whatever GRAB's location
  57. settings.  The printer reset code (Esc E) must precede this code to allow it to 
  58. take effect with the first envelope printed.
  59.  
  60.        If the escape sequence you choose is longer than 32 characters, it is 
  61. necessary to place the remainder of the INIT escape sequence in the first line 
  62. of the return address, as I describe in the next paragraph.  This option is not 
  63. mentioned in GRAB's manual.  If your sequence is 32 characters or less, you 
  64. don't need the technique, and can skip the paragraph.
  65.  
  66.        To use an escape sequence longer than 32 characters, enter the first 32 
  67. characters in the INIT string as numerical ASCII values.  Convert the rest of 
  68. the code to characters, not ASCII values; the HP manual lists both in most 
  69. cases.  Select the option to use a return address, even if you don't actually 
  70. want to print one - the escape sequences won't be printed out, and there is no 
  71. convenient way to append them to a "To" address.  With the cursor on the first 
  72. line of the address, enter the characters in the end segment of your escape 
  73. sequence.  If you need to enter the escape code (ASCII 27), first press CTRL-P, 
  74. then press ESC.  A bracket ("[") will appear against a black background, 
  75. different from the regular light background of the cursor.  Next, press CTRL-P, 
  76. then CTRL-J.  A "J" will appear, with a black background.  Then type the first 
  77. line of the return address (probably your name) immediately following.  The "J" 
  78. is a line feed (ASCII 10), which moves down the first line of the return 
  79. address, since the "Location" for "Up-Down Location, 'From' Address" in
  80. GRABCFG.EXE MUST be set at 0, or GRAB will print line feeds after sending the 
  81. INIT string, and before printing the end of the escape sequence which is in the 
  82. return address.  This breaks up the escape sequence, so it won't work.  You may 
  83. add or delete CTRL-P CTRL-J's to change the up-down position of the return 
  84. address.
  85.  
  86.        For Grab Plus 5.1, I recommend you start out with the following basic 
  87. escape sequence:
  88.        
  89. INIT: 27 69 27 38 108 50 54 97 48 76
  90. EXIT: 27 69 
  91.  
  92.        This resets the printer (27 69), sets it for A4 paper (27 38 108 50 54 
  93. 97), then disables perforation skip (48 76).  The EXIT string resets the 
  94. printer to the defaults specified by the printer's function switches.  These 
  95. escape sequences will allow you to position the return address as close to the 
  96. top left margin as possible.  You do not need to select the option in 
  97. GRABCFG.EXE to print the INIT sequence after every line of text.
  98.  
  99.        I have a TmsRmn ASCII font cartridge which I use for most printing, and 
  100. for all envelopes.  While I am annoyed by the microspacing error in the 
  101. firmware for the lower-case "f" in 10 point type, I recommend the cartridge if 
  102. you don't already have it.
  103.  
  104.        The escape sequence I use accesses a boldface 12 point proportionally 
  105. spaced Times Roman font, and prints it using line feed spacing of 1/5", instead 
  106. of the usual 1/6".  On the chance that you have the cartridge, the sequence I 
  107. use is:
  108.  
  109. INIT: 27 69 27 38 108 53 100 50 54 97 48 76 27 40 48 85 27 40 115 48 117 49 
  110. 112 49 50 118 48 115 48 98 53 116 50 81
  111.  
  112. EXIT: 27 69 
  113.  
  114.        For reference to the DeskJet manual, substituting "Ec" for the escape 
  115. code, the ASCII character counterpart to the INIT sequence above is:
  116.  
  117. INIT: Ec E Ec & l 5 d 2 6 a 0 L Ec ( 0 U Ec ( s 0 u 1 p 1 2 v 0 s 0 b 5 t 2 Q
  118.  
  119.        You should be able to piece the elements of this code together from 
  120. your DeskJet manual.  The escape sequences must be placed in the order 
  121. specified in the manual, and you can use HP's trick of combining sequences 
  122. which use the same two characters immediately following the escape code, using 
  123. a capital letter to terminate the combined sequences.
  124.  
  125.        The problem with the above code is that it contains 34 characters, so it
  126. won't all fit in GRAB's INIT string.  The last two characters, "2Q", must go 
  127. into the first line of the return address, using the contortions I described 
  128. above.
  129.  
  130.        The location settings I use for a large envelope are:
  131.        
  132.         UD To    0
  133.         LR To    50
  134.         LR From  -5
  135.         UD From   0
  136.  
  137.        These settings depend on the use of the TmsRmn font cartridge, using the 
  138. escape sequence above; they will not be correct for the standard Courier font.  
  139. For 10 pitch Courier, try
  140.  
  141.        UD To     1
  142.        LR To     0
  143.        LR From  -5
  144.        UD From   1
  145.  
  146.        I recommend pushing the envelope as far left as possible in the printer 
  147. before using the keypad controls to advance the letter.  You can check the 
  148. envelope's alignment before printing.
  149.  
  150.        If you've never dealt with escape sequences before, all this information
  151. may seem a bit cryptic.  The DeskJet manual chapters 4, 7, and the Appendix
  152. provide a fairly good explanation.  I hope you can modify my code to your own
  153. specs without too much trouble.
  154. ---------------------------------------------------------------------------
  155.  
  156.                                    ADDENDUM
  157.  
  158. For the record here is my GRABCFG configurations setting for the Helvette 12
  159. point font:
  160.        1. Set print type to regular
  161.        2. INIT/EXIT Codes
  162. Init String: 27 40 48 85 27 40 115 48 117 49 112 49 50 118 48 115
  163.             48 98 52 116 50 81 0 0 0 0 0 0 0 0 0 0
  164. Do you want the Init to print before each line? [N]
  165. Exit String: 27 69 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  166.  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  167. [Note this represents the following Ascii String for downloading a 12pt
  168. Helvette soft font: <Esc>(0U<Esc>(s0u1p12v0s0b4t2Q
  169. For 12 point Times Roman use the following ASCII string and convert it to
  170. the appropriate HEXIDECIMAL String for input into INIT code:
  171.        <Esc>(0U<Esc>(s0u1p12v0s0b5t2Q
  172. This information provided by Gary Elfring]
  173.        3. Change Large and Small Envelope - Printer Locations
  174. Large - The Up Down Location of the "To Address":              -2
  175. Large - The Left to Right Location of the "To Address":        55
  176. Large - The Left to Right Location of the "From Address":      -10
  177. Large - The Up Down Location of the "From Address":            -3
  178.        4. Download soft font to Deskjet prior to utilizing Grab.
  179.  
  180. -------------------------------------------------------------------------
  181. Todd D. Fladen, M.D. [76555,643]
  182.